const Router=require('koa-router')
const router=new Router({prefix:'/orders'})
const {validator}=require('../middleWare/ordera.middle')
//暂时不做信息校验
const {auth}=require('../middleWare/auth.middleware')
const {addOrdersFun,getOrderAll,update}=require('../controller/orders.controller')

router.post('/',auth,addOrdersFun,(ctx)=>{
    ctx.body={
        message:"生成订单"
    }
})

router.get('/',auth,getOrderAll)
router.patch('/:id',auth,update)
module.exports=router